<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="refresh" content="30">
  <title>Learn Vue</title>
</head>
<body>
  <h2>该页面是使用`README.md`在线转换成html内容的</h2>
  <hr />
  <div id="content"></div>

  <script src="https://cdn.jsdelivr.net/npm/jquery@3.4.1/dist/jquery.min.js"></script>
  <script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>

  <script type="text/javascript">
    $(function(){
      let res = null;
      let oldText = "learn";
      let newText = 'learn-vue/learn';
      $.ajax({
          url: 'README.md',
          dataType: 'text',
          success: function(data) {
            res = data || '';
            res = res.replace(new RegExp(oldText,'g'), newText);
            document.getElementById('content').innerHTML = marked(res)
          }
      });
      // console.log('res=\n'+res);
    });
  </script>
</body>
</html>